﻿// A company has name, address, phone number, fax number, web site and manager. The manager has first name, 
// last name, age and a phone number. Write a program that reads the information about a company and its 
// manager and prints them on the console.

using System;

class Program
{
    static void Main()
    {
        // Company information
        Console.Write("Enter company name: ");
        string companyName = Console.ReadLine();
        Console.Write("Enter address of the company: ");
        string address = Console.ReadLine();
        Console.Write("Enter phone number of the company: ");
        string phoneNumber = Console.ReadLine();
        Console.Write("Enter fax number of the company: ");
        string faxNumber = Console.ReadLine();
        Console.Write("Enter web site of the company: ");
        string webSite = Console.ReadLine();

        // Manager information
        Console.Write("Enter first name of the manager : ");
        string firstName = Console.ReadLine();
        Console.Write("Enter last name of the manager : ");
        string lastName = Console.ReadLine();
        Console.Write("Enter age of the manager : ");
        string ageStr = Console.ReadLine();
        int age;
        if (! int.TryParse(ageStr, out age))
        {
            Console.WriteLine("The entered age is invalid!");
        }
        Console.Write("Enter phone number of the manager : ");
        string phoneManager = Console.ReadLine();

        // Printing the entered information:
        Console.WriteLine();
        Console.WriteLine("{0, -30} {1, 1}", "Company Name : ", companyName);
        Console.WriteLine("{0, -30} {1, 1}", "Address of the Company : ", address);
        Console.WriteLine("{0, -30} {1, 1}", "Phone Number of the Company : ", phoneNumber);
        Console.WriteLine("{0, -30} {1, 1}", "Fax Number of the Company : ", faxNumber);
        Console.WriteLine("{0, -30} {1, 1}", "Web Site of the Company : ", webSite);
        Console.WriteLine("{0, -30} {1, 1}", "Manager of the Company : ", firstName, lastName);
        Console.WriteLine("{0, -30} {1, 1}", "Age of the Manager : ", age);
        Console.WriteLine("{0, -30} {1, 1}", "Phone Number of the Manager : ", phoneManager);
        Console.WriteLine();
    }
}